import request from '@/router/axios';
import {downloadExcel} from '@/router/axios';
import {formatCondition} from '@/util/util';

//模型任务组任务项关系管理单条查询
export const queryBizTestForm = (params) => {
  params.head.transCode = 'queryBizTestForm';
  return request({
    url: '/biz/model/bizTestForm/queryBizTestForm',
    method: 'post',
    data: params
  })
}
//模型任务组任务项关系管理多条列表查询，支持条件查询
export const queryBizTestFormListPage = (params) => {
  params.head.transCode = 'queryBizTestFormListPage';
  return request({
    url: '/biz/model/bizTestForm/queryBizTestFormListPage',
    method: 'post',
    data: params
  })
}
//模型任务组任务项关系管理新增单条记录
export const saveBizTestForm = (params) => {
  params.head.transCode = 'saveBizTestForm';
  return request({
    url: '/biz/model/bizTestForm/saveBizTestForm',
    method: 'post',
    data: params
  })
}
//模型任务组任务项关系管理新增多条记录
export const saveBizTestFormList = (params) => {
  params.head.transCode = 'saveBizTestFormList';
  return request({
    url: '/biz/model/bizTestForm/saveBizTestFormList',
    method: 'post',
    data: params
  })
}
//模型任务组任务项关系管理新增或修改单条记录
export const saveOrUpdateBizTestForm = (params) => {
  params.head.transCode = 'saveOrUpdateBizTestForm';
  return request({
    url: '/biz/model/bizTestForm/saveOrUpdateBizTestForm',
    method: 'post',
    data: params
  })
}


//模型任务组任务项关系管理新增或修改单条记录
export const saveOrUpdateBizTestFormList = (params) => {
  params.head.transCode = 'saveOrUpdateBizTestFormList';
  return request({
    url: '/biz/model/bizTestForm/saveOrUpdateBizTestFormList',
    method: 'post',
    data: params
  })
}

//模型任务组任务项关系管理修改单条记录
export const updateBizTestForm = (params) => {
  params.head.transCode = 'updateBizTestForm';
  return request({
    url: '/biz/model/bizTestForm/updateBizTestForm',
    method: 'post',
    data: params
  })
}

//模型任务组任务项关系管理删除单条记录
export const deleteBizTestForm = (params) => {
  params.head.transCode = 'deleteBizTestForm';
  return request({
    url: '/biz/model/bizTestForm/deleteBizTestForm',
    method: 'post',
    data: params
  })
}

//模型任务组任务项关系管理删除多条记录
export const deleteBizTestFormList = (params) => {
  params.head.transCode = 'deleteBizTestFormList';
  return request({
    url: '/biz/model/bizTestForm/deleteBizTestFormList',
    method: 'post',
    data: params
  })
}
//模型任务组任务项关系管理导出excel
export const exportBizTestFormExcel = (params) => {
  downloadExcel({
    url: '/biz/model/bizTestForm/excelDownload/exportBizTestFormExcel',
    method: 'get',
    data: 
    {
      tenantId: params.head.tenantId,
      orders:'',
      condition: formatCondition(params.body.sqlCondition)
    }
  })
}
